<?php
require_once PATH_SITE.'cn/royan/php/utils/writers/AbstractWriter.abstract.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of WriterRoom
 *
 * @author yanr
 */
class WriterRoomSimple extends AbstractWriter
{
    //put your code here
    function __construct( $room ) {
        $this->object = $room;
    }
    
    public function write()
    {
        $value['type']              = "SimpleRoom";
        $value['id']                = $this->object->__get("id");
        $value['name']              = $this->object->__get("name");
        $value['current']           = count( $this->object->__get("users") );
        $value['linkNumber']        = $this->object->__get("linkNumber");
        $value['status']            = $this->object->__get("status");
        
        RETURN $value;
        //RETURN json_encode($value);
    }
}

?>
